<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // navigator 

        // 获取浏览器类型
        const ua = navigator.userAgent;
        // 判断浏览器类型
        const isChrome = ua.indexOf('Chrome');
        console.log(isChrome);

        // screen

        // 看屏幕宽度高度
        console.log(screen.width);
        console.log(screen.height);


        // location
        console.log(location.href);
        console.log(location.protocol); // 获取使用协议，当前为file
        console.log(location.pathname); // 获取路径
        console.log(location.search); // 获取查询参数 问号内容
        console.log(location.hash); // 获取哈希值，井号后面内容


        // history
        // 前进和后退网页
        history.back()
        history.forward()

    </script>
</body>

</html>